def fib_recu(n):
    if n < 2:
        return 1
    else:
        return fib_recu(n - 1) + fib_recu(n - 2)


def fib_gen(n):
    i = 0
    x, y = 1, 1

    while i < n:
        yield y
        x, y = y, x + y
        i = i + 1


if __name__ == '__main__':
    # for i in range(10):
    #     print(fib_recu(i))

    for i in fib_gen(10):
        print(i)



